import Taro,{Component} from "@tarojs/taro"
import styles from './index.module.scss'
import { View, Image } from "@tarojs/components"
import LOGINLOGO_IMG from '@/assets/img/denlu_logo.png'
import sendTel from './components/sendTel'
import verifyMsg from './components/verifyMsg'
import {connect} from '@tarojs/redux'
import ServiceOnline from '@/components/ServiceOnline'

@connect(({login}) => ({
  teledTime: login.telTime,
}))

class Login extends Component {
  config = {
    navigationBarTitleText: '登录'
  }

  render () {
    return (
      <View className={styles.wrapper}>
        <View className={styles.container}>
          <Image src={LOGINLOGO_IMG} className={styles.loginImg}></Image>
          <View className={styles.loginTitle}>{this.props.teledTime==0?'欢迎登录椰云众包平台':'手机号验证'}</View>
          {/* {
            this.props.teledTime == 0 ? <sendTel/> :<verifyMsg/>
          } */}
          <sendTel style={this.props.teledTime == 0?'display:block':'display:none'} />
          <verifyMsg style={this.props.teledTime !=0?'display:block':'display:none'} />
        </View>
        <View className={styles.serviceOnline}>
          <ServiceOnline/>
        </View>
      </View>
    )
  }
}

export default Login
